package cn.xuanxuanyuhua.crm.domain;

import cn.xuanxuanyuhua.crm.util.JSONUtil;
import com.fasterxml.jackson.core.JsonProcessingException;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

@Setter
@Getter
public class Salary extends BaseDomain {

    private BigDecimal money;

    private Integer year;

    private Integer month;

    private Employee employee;

    public String getJson() throws JsonProcessingException {
        Map<String,Object> map = new HashMap<>();
        map.put("id",id);
        map.put("year",year);
        map.put("money",money);
        map.put("month",month);
        map.put("employee",employee);
        return JSONUtil.toJSONString(map);
    }



}